home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / program / swagd_f.zip / DATETIME.SWG / 0047_Getting Date from BIOS.pas < prev    next >
Pascal/Delphi Source File  |  1995-03-03  |  639b  |  33 lines

  1. {
  2. > I want to know if it's possible to get the BIOS Serial number and how to
  3. > get it in pascal.
  4.  
  5. I dunno about BIOS serial number, i know how to get a BIOS date, thats true.
  6. Here's the source (that is also welcome to place in SWAG):
  7. }
  8.  
  9. Function GetBiosDate : string; assembler;
  10. Asm
  11.   push ds
  12.   {$IFDEF DPMI}  { look, it works with DPMI too }
  13.   mov ax,2
  14.   mov bx,0FFFFh
  15.   int 31h
  16.   {$ELSE}
  17.   mov ax,0FFFFh
  18.   {$ENDIF}
  19.   mov ds,ax
  20.   mov si,0005h
  21.   les di,@Result
  22.   cld
  23.   mov ax,8
  24.   stosb
  25.   mov cx,ax
  26.   rep movsb
  27.   pop ds
  28. End; { GetBiosDate }
  29.  
  30. Begin
  31.   WriteLn('BIOS date: ', GetBiosDate) { Simple, eh? }
  32. End.
  33.